{% extends "base.html" %}
{% block content %}
<style>
.btn-file {
    position: relative;
    overflow: hidden;
}
.btn-file input[type=file] {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 100%;
    min-height: 100%;
    font-size: 999px;
    text-align: right;
    filter: alpha(opacity=0);
    opacity: 0;
    background: red;
    cursor: inherit;
    display: block;
}
input[readonly] {
    background-color: white !important;
    cursor: text !important;
}
</style>
<script type='text/javascript'>
$(document)
    .on('change', '.btn-file :file', function() {
        var input = $(this),
        numFiles = input.get(0).files ? input.get(0).files.length : 1,
        label = input.val().replace(/\\/g, '/').replace(/.*\//, '');
        input.trigger('fileselect', [numFiles, label]);
});

$(document).ready( function() {
    $('.btn-file :file').on('fileselect', function(event, numFiles, label) {

        var input = $(this).parents('.input-group').find(':text'),
            log = numFiles > 1 ? numFiles + ' files selected' : label;

        if( input.length ) {
            input.val(log);
        } else {
            if( log ) alert(log);
        }

    });
    $('.nav-tabs a').on('show.bs.tab', function (event) {
        var tabname = $(event.target).text()
        if (tabname == " PCAP" || tabname == " Static") {
            document.getElementById('non-pcap-1').style.display = "none";
            document.getElementById('non-pcap-2').style.display = "none";
        } else {
            document.getElementById('non-pcap-1').style.display = "block";
            document.getElementById('non-pcap-2').style.display = "block";
        }
    });
});
</script>
<div class="row">
    <div class="col-md-6 col-md-offset-3 mx-auto">
        <form role="form" action="" method="post" enctype="multipart/form-data">
            {% csrf_token %}
            <div class="tabbable">
                <ul class="nav nav-tabs">
                    {% if resubmit %}
                        <li class="nav-item active"><a class="nav-link" href="#resubmit" data-toggle="tab"><span class="fa fa-file"></span> File resubmission</a></li>
                    {% else %}
                        <li class="nav-item active"><a class="nav-link" href="#file" data-toggle="tab"><span class="fa fa-file"></span> File(s)</a></li>
                        {% if config.vt %}
                            <li class="nav-item"><a class="nav-link" href="#vtdl" data-toggle="tab"><span class="fa fa-download"></span> VirusTotal</a></li>
                        {% endif %}
                        {% if config.bazaar %}
                            <li class="nav-item"><a class="nav-link" href="#bazaar" data-toggle="tab"><span class="fa fa-download"></span> MalwareBazaar</a></li>
                        {% endif %}
                        {% if config.url_analysis %}
                            <li class="nav-item"><a class="nav-link" href="#url" data-toggle="tab"><span class="fa fa-globe"></span> URL</a></li>
                        {% endif %}
                        {% if config.dlnexec %}
                            <li class="nav-item"><a class="nav-link" href="#dlurl" data-toggle="tab"><span class="fa fa-download"></span> DL&Exec</a></li>
                        {% endif %}
                        <li class="nav-item"><a class="nav-link" href="#pcap" data-toggle="tab"><span class="fa fa-network-wired"></span> PCAP</a></li>
                        <li class="nav-item"><a class="nav-link" href="#static" data-toggle="tab"><span class="fa fa-tasks"></span> Static</a></li>
                    {% endif %}
                </ul>
                <div class="tab-content">
                    {% if resubmit %}
                        <div class="tab-pane fade show active" id="resubmit">
                            <div class="input-group mb-3">
                                <label class="sr-only" form="form_resubmission"> File resubmission</label>
                                <input type="text" class="form-control" id="form_resubmission" name="hash" value="{{resubmit}}" />
                            </div>
                        </div>
                    {% else %}
                        <div class="tab-pane fade show active" id="file">
                            <div class="input-group">
                                    <input type="text" class="form-control" readonly>
                                    <span class="btn btn-secondary btn-file">
                                        Select <input type="file" name="sample" multiple="multiple">
                                    </span>
                            </div>
                        </div>

                        {% if config.vt %}
                        <div class="tab-pane fade show" id="vtdl">
                            <div class="input-group col-md-12">
                                <label class="sr-only" form="form_vtdl"> VirusTotal</label>
                                <input type="text" class="form-control" id="form_vtdl" name="vtdl" placeholder="Enter comma separated hashes or just a hash" />
                            </div>
                        </div>
                        {% endif %}
                        {% if config.bazaar %}
                        <div class="tab-pane fade show" id="bazaar">
                            <div class="input-group col-md-12">
                                <label class="sr-only" form="form_bazaar"> MalwareBazaar</label>
                                <input type="text" class="form-control" id="form_bazaar" name="bazaar" placeholder="Enter comma separated hashes or just a hash" />
                            </div>
                        </div>
                        {% endif %}
                        <div class="tab-pane fade show" id="url">
                            <div class="input-group col-md-12">
                                <label class="sr-only" form="form_url">URL</label>
                                <input type="text" class="form-control" id="form_url" name="url" placeholder="URL" />
                            </div>
                        </div>
                        {% if config.dlnexec %}
                        <div class="tab-pane fade show" id="dlurl">
                            <div class="input-group col-md-12">
                                <label class="sr-only" form="form_url">URL</label>
                                <input type="text" class="form-control" id="form_url" name="dlnexec" placeholder="URL to download sample from" />
                            </div>
                        </div>
                        {% endif %}
                        <div class="tab-pane fade show" id="pcap">
                            <div class="input-group">
                                    <input type="text" class="form-control" readonly>
                                    <span class="btn btn-secondary btn-file">
                                        Select <input type="file" name="pcap" multiple="multiple">
                                    </span>
                            </div>
                        </div>
                        <div class="tab-pane fade show" id="static">
                            <div class="input-group">
                                    <input type="text" class="form-control" readonly>
                                    <span class="btn btn-secondary btn-file">
                                        Select <input type="file" name="static" multiple="multiple">
                                </span>
                            </div>
                        </div>
                    {% endif %}
                </div>
            </div>
            <div class="panel" id="accordion" style="margin-top: 20px;">
                <div class="card " style="margin-bottom: 0px;">
                    <div class="card-header">
                        <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#options"><i class="icon icon-cog"></i> Advanced Options</a>
                    </div>
                    <div id="options" class="panel-collapse collapse show" style="text-align: left;">
                        <div class="card-body">
                            <div id="non-pcap-1">
                                {% if existent_tasks %}
                                <div class="form-group">
                                    <label for="form_existent_tasks"><a class="btn btn-secondary" href="#existent_tasks" data-toggle="collapse" aria-expanded="true" ><b>Show existent tasks</b></a></label>
                                    <div id="existent_tasks" class="collapse">
                                        {% for sha256, details in existent_tasks.items %}
                                            <div class="alert alert-secondary"><h4>Existent tasks for this hash: <b>{{sha256}}</b>!</h4>
                                                <ul>
                                                    {% for block in details %}
                                                        <li>Task id: <a href="{% url "report" block.info.id %}"><span>{{block.info.id}}</span></a> {% if block.family  %} - Detection: <span style="color:#EE1B2F;">{{block.malfamily}}</span>{% endif %}</li>
                                                    {% endfor %}
                                                </ul>
                                            </div>
                                        {% endfor %}
                                    </div>
                                </div>
                                {% endif %}
                                {% if resubmit %}
                                    <div class="form-group">
                                        <label for="form_package">Task Category</label>
                                        <select class="form-control" id="form_package" name="job_category">
                                            <option value="hash" checked>Resubmit</option>
                                            <option value="sample">Files</option>
                                            <option value="static">Static analysis</option>
                                            <option value="pcap">Pcap</option>
                                            <option value="dlnexec">Download and Execute</option>
                                            <option value="vtdl">Virustotal Download</option>
                                            <option value="bazaar">MalwareBazaar Download</option>
                                        </select>
                                    </div>
                                {% endif %}
                                <div class="form-group">
                                    <label for="form_package">Analysis Package</label>
                                    <select class="form-control" id="form_package" name="package">
                                        <option value="" active>Detect Automatically</option>
                                        {% for package in packages %}
                                        <option value="{{package}}">{{package}}</option>
                                        {% endfor %}
                                    </select>
                                </div>
                                {% if not config.dist_master_storage_only %}
                                    <div class="form-group">
                                        <label for="form_machine">Machine</label>
                                        <select class="form-control" id="form_machine" name="machine">
                                            {% for id,label in machines %}
                                            <option value="{{id}}">{{label}}</option>
                                            {% endfor %}
                                        </select>
                                    </div>
                                {% endif %}
                                {% if config.tags and tags %}
                                <div class="form-group">
                                    <label for="form_tags">Machine Tags (<a href="#tagshelp" data-toggle="collapse">help</a>)</label>
                                    <input type="text" class="form-control" id="form_tags" name="tags" value=""/>
                                    <div id="tagshelp" class="collapse">
                                        <p class="text-muted" style="margin-top: 10px;">Syntax is tag1,tag2,tag3, etc.</p>
                                        <table class="table table-striped table-centered table-hover table-dark">
                                            <thead>
                                                <tr>
                                                    <th style="text-align: center;">Tags</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                {% for tag in tags %}
                                                <tr>
                                                    <td><code>{{tag}}</code></td>
                                                </tr>
                                                {% endfor %}
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                                {% endif %}
                                <div class="form-group">
                                    <strong>Network routing through <i>dirty line</i> or VPN</strong>
                                </div>
                                <div class="form-group">
                                    <select class="form-control" id="form_route" name="route">
                                        {% if internet != "none" %}
                                            <option value="internet"{% if route == "internet" %} selected{% endif %}>Internet (dirty line, {{ internet }})</option>
                                        {% endif %}}
                                        {% if random_route %}
                                            {% if random_route.type == "SOCKS5" %}
                                            <option value="{{ random_route.name }}" selected hidden>[RANDOM] {{ random_route.name }} - {{ random_route.host }}:{{ random_route.port }} ({{ random_route.type }})</option>
                                            {% else %}
                                            <option value="{{ vpn.name }}" selected hidden>[RANDOM] {{ vpn.description }} ({{ vpn.interface }}, {{ vpn.type }})</option>
                                            {% endif %}
                                        {% endif %}
                                        {% if inetsim %}
                                            <option value="inetsim">inetsim/fakenet-ng</option>
                                        {% endif %}
                                        {% if tor %}
                                            <option value="tor">tor</option>
                                        {% endif %}
                                        {% for vpn in vpns %}
                                            <option value="{{ vpn.name }}">{{ vpn.description }} ({{ vpn.interface }}, {{ vpn.type }})</option>
                                        {% endfor %}

                                        {% for socks5 in socks5s %}
                                            <option value="{{ socks5.name }}">{{ socks5.name }} - {{ socks5.host }}:{{ socks5.port }} ({{ socks5.type }})</option>
                                        {% endfor %}
                                        {% if all_exitnodes %}
                                            {% for route_name in all_exitnodes %}
                                                <option value="{{ route_name }}">{{ route_name }} (will pick proper server)</option>
                                            {% endfor %}
                                        {% endif %}
                                        <option value="none"{% if route == "none" %} selected{% endif %}>Drop all VM traffic</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="form_timeout">Timeout (in seconds)</label>
                                    <input type="text" class="form-control" id="form_timeout" name="timeout" value="{{config.timeout}}" />
                                </div>
                                {% if config.linux_on_gui %}
                                <div class="form-group">
                                    <label for="form_lin_options">Linux Options (<a href="#optionlinuxhelp" data-toggle="collapse">help</a>)</label>
                                    <div id="optionlinuxhelp" class="collapse">
                                        <p class="text-muted" style="margin-top: 10px;">Syntax is option1=val1,option2=val2,option3=val3, etc.</p>
                                        <table class="table table-striped table-centered">
                                            <thead>
                                                <tr>
                                                    <th style="text-align: center;">Option</th>
                                                    <th style="text-align: center;">Description</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <tr>
                                                    <td><code>filename</code></td>
                                                    <td>Rename the sample file</td>
                                                </tr>
                                                <tr>
                                                    <td><code>file</code></td>
                                                    <td>When using the zip or rar package, set the name of the file to execute</td>
                                                </tr>
                                                <tr>
                                                    <td><code>password</code></td>
                                                    <td>When using the zip/rar package, set the password to use for extraction/decryption.  Also used when analyzing password-protected Office documents.</td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                    <input type="text" class="form-control" id="form_lin_options" name="lin_options"/>
                                </div>
                                {% endif %}
                            </div>
                            <div class="form-group">
                                    <label for="form_options">Options (<a href="#optionwindowshelp" data-toggle="collapse">help</a>)</label>
                                    <div id="optionwindowshelp" class="collapse">
                                        <p class="text-muted" style="margin-top: 10px;">Syntax is option1=val1,option2=val2,option3=val3, etc.</p>
                                        <table class="table table-striped table-centered table-hover table-dark">
                                            <thead>
                                                <tr>
                                                    <th style="text-align: center;">Option</th>
                                                    <th style="text-align: center;">Description</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <tr>
                                                    <td><code>filename</code></td>
                                                    <td>Rename the sample file</td>
                                                </tr>
                                                <tr>
                                                    <td><code>name</code></td>
                                                    <td>This will force family extractor to run, Ex: name=trickbot</td>
                                                </tr>
                                                <tr>
                                                    <td><code>curdir</code></td>
                                                    <td>Change from where execute sample, by default %TEMP%, Ex: curdir=%APPDATA% or
                                                        curdir=%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td><code>executiondir</code></td>
                                                    <td>Sets directory to launch the file from. Need not be the same as the directory of sample file. Defaults to %TEMP% if both executiondir and curdir are not specified. Only supports full paths</td>
                                                </tr>
                                                <tr>
                                                    <td><code>free</code></td>
                                                    <td>Run without monitoring (disables many capabilities) Ex: free=1</td>
                                                </tr>
                                                <tr>
                                                    <td><code>force-sleepskip</code></td>
                                                    <td>Override default sleep skipping behavior:  0 disables all sleep skipping, 1 skips all sleeps.</td>
                                                </tr>
                                                <tr>
                                                    <td><code>full-logs</code></td>
                                                    <td>By default, logs prior to network activity for URL analyses and prior to access of the file in question for non-executable formats are suppressed.  Set to 1 to disable log suppression.</td>
                                                </tr>
                                                <tr>
                                                    <td><code>force-flush</code></td>
                                                    <td>For performance reasons, logs are buffered before being sent back to the result server.  We make every attempt to flush the buffer at critical points including when exceptions occur, but in some rare termination scenarios, logs may be lost.  Set to 1 to force flushing of the log buffers after any non-duplicate API is called, set to 2 to force flushing of every log.</td>
                                                </tr>
                                                <tr>
                                                    <td><code>no-stealth</code></td>
                                                    <td>Set to 1 to disable anti-anti-VM/sandbox code enabled by default.</td>
                                                </tr>
                                                <tr>
                                                    <td><code>buffer-max</code></td>
                                                    <td>When set to an integer of your choice, changes the maximum number of bytes that can be logged for most API buffers.</td>
                                                </tr>
                                                <tr>
                                                    <td><code>large-buffer-max</code></td>
                                                    <td>Some hooked APIs permit larger buffers to be logged.  To change the limit for this, set this to an integer of your choice.</td>
                                                </tr>
                                                <tr>
                                                    <td><code>norefer</code></td>
                                                    <td>Disables use of a fake referrer when performing URL analyses</td>
                                                </tr>
                                                <tr>
                                                    <td><code>file</code></td>
                                                    <td>When using the zip or rar package, set the name of the file to execute</td>
                                                </tr>
                                                <tr>
                                                    <td><code>password</code></td>
                                                    <td>When using the zip or rar package, set the password to use for extraction.  Also used when analyzing password-protected Office documents.</td>
                                                </tr>
                                                <tr>
                                                    <td><code>function</code></td>
                                                    <td>When using the dll package, set the name of the exported function/ordinal to execute. Can be multiple function/ordinals splited by colon. Ex: function=func1:func2</td>
                                                </tr>
                                                <tr>
                                                    <td><code>dllloader</code></td>
                                                    <td>When using the dll package, set the name of the process loading the DLL (defaults to rundll32.exe).</td>
                                                </tr>
                                                <tr>
                                                    <td><code>arguments</code></td>
                                                    <td>When using the dll, exe, or python packages, set the arguments to be passed to the executable or exported function.</td>
                                                </tr>
                                                <tr>
                                                    <td><code>appdata</code></td>
                                                    <td>When using the exe package, set to 1 to run the executable out of the Application Data path instead of the Temp directory.</td>
                                                </tr>
                                                <tr>
                                                    <td><code>startbrowser</code></td>
                                                    <td>Setting this option to 1 will launch a browser 30 seconds into the analysis (useful for some banking trojans).</td>
                                                </tr>
                                                <tr>
                                                    <td><code>browserdelay</code></td>
                                                    <td>Sets the number of seconds to wait before starting the browser with the startbrowser option.  Defaults to 30 seconds.</td>
                                                </tr>
                                                <tr>
                                                    <td><code>url</code></td>
                                                    <td>When used with the startbrowser option, this will determine the URL the started browser will access.</td>
                                                </tr>
                                                <tr>
                                                    <td><code>debug</code></td>
                                                    <td>Set to 1 to enable reporting of critical exceptions occurring during analysis, set to 2 to enable reporting of all exceptions.</td>
                                                </tr>
                                                <tr>
                                                    <td><code>disable_hook_content</code></td>
                                                    <td>Set to 1 to remove functionality of all hooks except those critical for monitoring other processes.  Set to 2 to apply to all hooks.</td>
                                                </tr>
                                                <tr>
                                                    <td><code>hook-type</code></td>
                                                    <td>Valid for 32-bit analyses only.  Specifies the hook type to use: direct, indirect, or safe.  Safe attempts a Detours-style hook.</td>
                                                </tr>
                                                <tr>
                                                    <td><code>serial</code></td>
                                                    <td>Spoof the serial of the system volume as the provided hex value</td>
                                                </tr>
                                                <tr>
                                                    <td><code>single-process</code></td>
                                                    <td>When set to 1 this will limit behaviour monitoring to the initial process only.</td>
                                                </tr>
                                                <tr>
                                                    <td><code>exclude-apis</code></td>
                                                    <td>Exclude the colon-separated list of APIs from being hooked</td>
                                                </tr>
                                                <tr>
                                                    <td><code>exclude-dlls</code></td>
                                                    <td>Exclude the colon-separated list of DLLs from being hooked</td>
                                                </tr>
                                                <tr>
                                                    <td><code>dropped-limit</code></td>
                                                    <td>Override the default dropped file limit of 100 files</td>
                                                </tr>
                                                <tr>
                                                    <td><code>compression</code></td>
                                                    <td>When set to 1 this will enable CAPE's extraction of compressed payloads</td>
                                                </tr>
                                                <tr>
                                                    <td><code>extraction</code></td>
                                                    <td>When set to 1 this will enable CAPE's extraction of payloads from within each process</td>
                                                </tr>
                                                <tr>
                                                    <td><code>injection</code></td>
                                                    <td>When set to 1 this will enable CAPE's capture of injected payloads between processes</td>
                                                </tr>
                                                <tr>
                                                    <td><code>combo</code></td>
                                                    <td>This combines compression, injection and extraction with process dumps</td>
                                                </tr>
                                                <tr>
                                                    <td><code>dump-on-api</code></td>
                                                    <td>Dump the calling module when a function from the colon-separated list of APIs is used</td>
                                                </tr>
                                                <tr>
                                                    <td><code>bp0</code></td>
                                                    <td>Sets breakpoint 0 (processor/hardware) to a VA or RVA value (or module::export). Applies also to bp1-bp3.</td>
                                                </tr>
                                                <tr>
                                                    <td><code>file-offsets</code></td>
                                                    <td>Breakpoints in bp0-bp3 will be interpreted as PE file offsets rather than RVAs</td>
                                                </tr>
                                                <tr>
                                                    <td><code>break-on-return</code></td>
                                                    <td>Sets breakpoints on the return address(es) from a colon-separated list of APIs</td>
                                                </tr>
                                                <tr>
                                                    <td><code>base-on-api</code></td>
                                                    <td>Sets the base address to which breakpoints will be applied (and sets breakpoints)</td>
                                                </tr>
                                                <tr>
                                                    <td><code>depth</code></td>
                                                    <td>Sets the depth an instruction trace will step into (defaults to 0, requires Trace package)</td>
                                                </tr>
                                                <tr>
                                                    <td><code>count</code></td>
                                                    <td>Sets the number of instructions in a trace (defaults to 128, requires Trace package)</td>
                                                </tr>
                                                <tr>
                                                    <td><code>referrer</code></td>
                                                    <td>Specify the referrer to be used for URL tasks, overriding the default Google referrer</td>
                                                </tr>
                                                <tr>
                                                    <td><code>loop_detection</code></td>
                                                    <td>Set this option to 1 to enable loop detection (compress call logs - behavior analysis)</td>
                                                </tr>
                                                <tr>
                                                    <td><code>static</code></td>
                                                    <td>Check if config can be extracted statically, if not, send to vm</td>
                                                </tr>
                                                <tr>
                                                    <td><code>Dl&Exec add headers example</code></td>
                                                    <td>dnl_user_agent: "CAPE Sandbox", dnl_referer: google</td>
                                                </tr>
                                                <tr>
                                                    <td><code>servicedesc - for service package</code></td>
                                                    <td>Service description</td>
                                                </tr>
                                                <tr>
                                                    <td><code>arguments - for service package</code></td>
                                                    <td>Service arguments</td>
                                                </tr>
                                                <tr>
                                                    <td><code>store_memdump</code></td>
                                                    <td>Will force STORE memdump, only when submitting to analyzer node directly, as distributed cluster can modify this </td>
                                                </tr>
                                                <tr>
                                                    <td><code>pre_script_args</code></td>
                                                    <td>Command line arguments for pre_script. Example: pre_script_args=file1 file2 file3</td>
                                                </tr>
                                                <tr>
                                                    <td><code>pre_script_timeout</code></td>
                                                    <td>pre_script_timeout will default to 60 seconds. Script will stop after timeout Example: pre_script_timeout=30</td>
                                                </tr>
                                                <tr>
                                                    <td><code>during_script_args</code></td>
                                                    <td>Command line arguments for during_script. Example: during_script_args=file1 file2 file3</td>
                                                </tr>
                                                <tr>
                                                    <td><code>ignore_size_check</code></td>
                                                    <td>Allow ignore file size, must be enabled in conf/web.conf</td>
                                                </tr>
                                                <tr>
                                                    <td><code>pwsh</code></td>
                                                    <td>When using the ps1 package, prefer PowerShell Core (pwsh.exe) if available (defaults to powershell.exe)</td>
                                                </tr>
                                                <tr>
                                                    <td><code>unpacker</code></td>
                                                    <td>Ex: unpacker=2 - Add description here</td>
                                                </tr>
                                                <tr>
                                                    <td><code>check_shellcode</code></td>
                                                    <td>Setting check_shellcode=0 will disable checking for shellcode during package identification and extracting from archive</td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                    <input type="text" class="form-control" id="form_options" name="options"/>
                                </div>
                            <div class="form-group">
                                <label for="form_priority">Priority</label>
                                <select class="form-control" id="form_priority" name="priority">
                                    <option value="1">Low</option>
                                    <option value="2" selected>Medium</option>
                                    <option value="3">High</option>
                                </select>
                            </div>
                            {% if config.tlp %}
                                <div class="form-group">
                                    <label for="form_tlp">TLP</label>
                                    <select class="form-control" id="form_tlp" name="tlp">
                                        <option value="" selected>White</option>
                                        <option value="Green">Green</option>
                                        <option value="Amber">Amber</option>
                                        <option value="Red">Red</option>
                                    </select>
                                </div>
                            {% endif %}
                            <div id="non-pcap-2">
                            <div class="form-group">
                                <label for="form_custom">Clock</label>
                                <input type="text" class="form-control" id="text" name="clock" placeholder="MM-DD-YYYY HH:mm:00" />
                            </div>
                            <div class="form-group">
                                <label for="form_tags_tasks">Tasks Tags(allows set "tag" for your jobs)</label>
                                <input type="text" class="form-control" id="form_tags_tasks" name="tags_tasks" />
                            </div>
                            {% if config.pre_script %}
                            <div class="form-group tab-pane fade show active" id="file">
                                <label for="form_pre_script">Python Pre-Execution Script to run</label>
                                <div id="form_pre_script" class="input-group">
                                    <input type="text" class="form-control" style="background-color: darkgrey !important;" readonly>
                                    <span class="btn btn-secondary btn-file">
                                        Select <input type="file" name="pre_script">
                                    </span>
                                </div>
                            </div>
                            {% endif %}
                            {% if config.during_script %}
                            <div class="form-group tab-pane fade show active" id="file">
                                <label for="form_during_script">Python During-Execution Script to run</label>
                                <div id="form_during_script" class="input-group">
                                    <input type="text" class="form-control" style="background-color: darkgrey !important;" readonly>
                                    <span class="btn btn-secondary btn-file">
                                        Select <input type="file" name="during_script">
                                    </span>
                                </div>
                            </div>
                            {% endif %}
                            <div class="form-group">
                                <label for="form_custom">Custom</label>
                                <input type="text" class="form-control" id="form_custom" name="custom" />
                            </div>
                            <div class="form-check">
                                <label>
                                    <input type="checkbox" name="process_dump" /> Disable process dumps
                                </label>
                            </div>
                            {% if config.procmemory %}
                            <div class="form-check">
                                <label>
                                    <input type="checkbox" name="process_memory"/> Full process memory dumps
                                </label>
                            </div>
                            {% endif %}
                            {% if config.amsidump %}
                            <div class="form-check">
                                <label>
                                    <input type="checkbox" name="amsidump" checked/> AMSI dumps <span class="text-muted"><small>(Windows 10+ Anti-Malware Scan Interface)</small></span>
                                </label>
                            </div>
                            {% endif %}
                            <div class="form-check">
                                <label>
                                    <input type="checkbox" name="import_reconstruction" /> Enable import reconstruction in process dumps
                                </label>
                            </div>
                            {% if config.memory %}
                            <div class="form-check">
                                <label>
                                    <input type="checkbox" name="memory" /> Full Memory Dump <span class="text-muted"><small>(if the "memory" processing module is enabled, will launch a Volatility analysis)</small></span>
                                </label>
                            </div>
                            {% endif %}
                            <div class="form-check">
                                <label>
                                    <input type="checkbox" name="enforce_timeout" /> Enforce Timeout
                                </label>
                            </div>
                            <div class="form-check">
                                <label>
                                    <input type="checkbox" name="free" /> Run without monitoring <span class="text-muted"><small>(disables many capabilities)</small></span>
                                </label>
                            </div>
                            <div class="form-check">
                                <label>
                                    <input type="checkbox" name="unpacker" /> 'Active' unpacking <span class="text-muted"><small>(uses debugger breakpoints) </small></span>
                                </label>
                            </div>
                            <div class="form-check">
                                <label>
                                    <input type="checkbox" name="syscall" checked/> Syscall hooks <span class="text-muted"><small>(Windows 10+) </small></span>
                                </label>
                            </div>
                            <div class="form-check">
                                <label>
                                    <input type="checkbox" name="norefer" /> No Fake Referrer for URL Tasks
                                </label>
                            </div>
                            <div class="form-check">
                                <label>
                                    <input type="checkbox" name="nohuman" /> Disable automated interaction
                                </label>
                            </div>
                            <div class="form-check">
                                <label>
                                    <input type="checkbox" name="interactive" /> Interactive desktop
                                </label>
                            </div>
                            <div class="form-check">
                                <label>
                                    <input type="checkbox" name="manual" /> Manual detonation. Must be used with Interactive desktop
                                </label>
                            </div>
                            {% if config.kernel %}
                            <div class="form-check">
                                <label>
                                    <input type="checkbox" name="kernel_analysis" /> Enable zer0m0n kernel-based behavioral analysis
                                </label>
                            </div>
                            {% endif %}
                            <div class="form-check">
                                <label>
                                    <input type="checkbox" name="static"/> Try to extract config without VM <span class="text-muted"><small>(Submit to VM if not extracted)</small></span>
                                </label>
                            </div>
                            <div class="form-check">
                                <label>
                                    <input type="checkbox" name="oldloader" /> Thread-based monitor injection <span class="text-muted"><small>(Cuckoo-style)</small></span>
                                </label>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            </div>
            <center><div style="margin-top: 20px;"><button type="submit" class="btn btn-secondary btn-lg">Analyze</button></div></center>
        </form>
    </div>
</div>
{% endblock %}
